﻿@using QDT.Common
@using QDT.Core
@using QDT.Core.Members
@using QDT.MVC.UI
@model QDT.Common.IPagedList<QDT.Core.Members.UserTransLog>
@{
    ViewBag.Title = "交易明细";
    int i = 0;
}
<link href="/Content/Default/CSS/AllLogList.css" rel="stylesheet" type="text/css" />
<script src="/Content/Default/JS/change.js" type="text/javascript"></script>
<script src="/Content/Default/JS/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script type="text/javascript">
    $().ready(function () {
        $("#ui-shouzhimingxi a").addClass("a_class");
        $("#TransactionMingxi").css("background", "#e0524b");
        $("#TransactionMingxi i,#TransactionMingxi span").css("color", "white");
        $("#TransactionMingxi .san-jiaoxing").css("display", "block");
        $(".ui-select").find("option[value='@ViewBag.tradetype']").attr("selected", true);
    });
    function check() {
        var startime = $("#d4321").val();
        var endtime = $("#d4322").val();
        if (!startime || !endtime) {
            alert("请选择查询的时间");   
            return false;
        }
        return true;
    }
</script>
@Html.Action("_UserBanner")
<div class="ui-body">
    <div class="ui-inner">
        <div class="ui-grid-row">
            @Html.Action("UserMenu", new { route = MenuRoute.TradeDetail })
            <div class="ui-grid-20">
                <div class="ui-box">
                    @Html.Partial("_JiaoyiMingxiTitle")
                    <form action="@Url.Action("AllLogList")">
                     <div style="height: 50px;">
                        <div class="drop_listall" style="margin-left: 0;">
                            <select class="ui-select" name="TradeType">
                                <option value="-1">全部</option>
@*                                <option value="1">充值</option>*@
@*                                <option value="2">提现冻结</option>*@
                                <option value="6">投资冻结</option>
                                <option value="8">回收利息</option>
                                <option value="9">回收本金</option>
@*                                <option value="3">提现失败</option>*@
@*                                <option value="7">投资失败</option>*@
@*                                <option value="12">卖出债权</option>*@
                                <option value="0">其它</option>
                            </select></div>
                        <div class="drop_listall">
                            <div class="ui-timeone" style="margin-left: 50px;">
                                <input name="starTime" class="Wdate" type="text" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'d4322\',{d:-1});}'})"
                                    id="d4321" readonly="readonly" placeholder="请选择时间" value="@ViewBag.startime"/></div>
                            <lable style="float: left; font-size: 14px; margin: 0 0 0 20px;">至</lable>
                            <div class="ui-timeone">
                                <input name="endTime" class="Wdate" type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'d4321\',{d:1});}'})"
                                    id="d4322" readonly="readonly" placeholder="请选择时间" value="@ViewBag.endtime"/></div>
                            <div class="ui-btntime">
                                <input type="submit" value="筛  选" id="btn_shaixuan" /></div>
                        </div>
                    </div>
                    <div class="ui-table-container">
                        <table style="width: 100%">
                            <thead>
                                <tr>
                                    <th>
                                        时间
                                    </th>
                                    <th>
                                        交易名称 │ 单号
                                    </th>
                                    <th style="padding-left: 40px; text-align: left">
                                        明细
                                    </th>
                                    <th>
                                        对方
                                    </th>
                                    <th>
                                        金额
                                    </th>
                                </tr>
                            </thead>
                            <tbody id="datalist">
                                @foreach (var alllog in Model)
                                {
                                   
                                    <tr>
                                        <td class="ui-timewidths">
                                            @alllog.Time
                                        </td>
                                        <td class="ui-tdtwo" style="text-align: center;">
                                            @(alllog.Trade == 0 ? "-" : alllog.Trade.ToLocalizable())<br />
                                            @alllog.ID
                                        </td>
                                        <td class="ui-tdthree">
                                            @(alllog.Info.Length > 23 ? alllog.Info.Substring(0, 23) : alllog.Info)
                                        </td>
                                        <td class="ui-tdcenter">
                                            @(string.IsNullOrWhiteSpace(alllog.TradeUser) ? "-" : alllog.TradeUser)
                                        </td>
                                        <td class="ui-td1bb974">
                                            @if(alllog.Money > 0){ <span style="color:#27ae60">+@alllog.Money.ToString("0.00")</span>}
                                            else
                                            {
                                                 <span style="color: #f39c12">@alllog.Money.ToString("0.00")</span>
                                            }
                                        </td>
                                    </tr>
                                }
                            </tbody>
                        </table>
                    </div>
                    </form>
                   
                </div>
                <div style="text-align: center; margin-top: 20px;">@Html.ClientPager(Model)</div>
            </div>
        </div>
    </div>
</div>
<div style="margin-top: -3px;">@Html.Partial("_BindBottomImage")</div>
